<?php 

class Ext_Video_Fetch_Parse_Adapter_Sina extends Ext_Video_Fetch_Parse_Abstract
{
    public function parse()
    {
        $this->_datas['host'] = "video.sina.com.cn";

        if(preg_match("/\s*vid\s*:\s*\'([0-9]+)\',/ui", $this->_html, $m) && $m[1]){      
             $this->_datas['viewId'] = $m[1];
        }

        $this->_datas['url'] = $this->_url;

        if(preg_match("/,\s*title:\'([^\"\']+?)\',/ui", $this->_html, $m) && $m[1]){
            $this->_datas['title'] = $m[1];
        }

        if(preg_match("/\s*pic\s*:\s*\'([^\"\']+?)\',/si", $this->_html, $m) && $m[1]){
            $this->_datas['photo'] = $m[1];
        }
    }

}
